﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Store.DateModel;

public partial class Pages_WebControls_NewProduct : System.Web.UI.UserControl
{
    StoreApplicationService sas = new StoreApplicationService();

    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void NewProductRepeater_Init(object sender, EventArgs e)
    {
        var query = sas.GetNewestProducts(1);
        if (query == null)
        {
            throw new NullReferenceException();
        }

        NewProductRepeater.DataSource = query;
        NewProductRepeater.DataBind();
    }
}